/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.mapper;

import com.hpb.bc.entity.HpbNodeRewardRecord;
import com.hpb.bc.example.HpbNodeRewardRecordExample;

import java.math.BigDecimal;
import java.util.List;

import com.hpb.bc.vo.NodeDailyRewardVo;
import org.apache.ibatis.annotations.Param;

public interface HpbNodeRewardRecordMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_node_reward_record
     *
     * @mbg.generated
     */
    long countByExample(HpbNodeRewardRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_node_reward_record
     *
     * @mbg.generated
     */
    int deleteByExample(HpbNodeRewardRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_node_reward_record
     *
     * @mbg.generated
     */
    int insert(HpbNodeRewardRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_node_reward_record
     *
     * @mbg.generated
     */
    int insertSelective(HpbNodeRewardRecord record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_node_reward_record
     *
     * @mbg.generated
     */
    List<HpbNodeRewardRecord> selectByExample(HpbNodeRewardRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_node_reward_record
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") HpbNodeRewardRecord record, @Param("example") HpbNodeRewardRecordExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_node_reward_record
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") HpbNodeRewardRecord record, @Param("example") HpbNodeRewardRecordExample example);

    BigDecimal selectSumVoteRewardByAddressAndStartBlockNumberAndEndBlockNumber(@Param("address") String address,@Param("startBlockTimestamp")  long startBlockTimestamp,@Param("endBlockTimestamp")  long endBlockTimestamp);

    List<HpbNodeRewardRecord> selectNodeRewardList(@Param("address") String address,@Param("startBlockTimestamp")  long startBlockTimestamp,@Param("endBlockTimestamp") long endBlockTimestamp);

    List<NodeDailyRewardVo> selectNodeDailyRewardList(@Param("address") String address,@Param("startBlockTimestamp")  long startBlockTimestamp,@Param("endBlockTimestamp") long endBlockTimestamp);

    List<NodeDailyRewardVo> selectNodeMonthRewardList(@Param("address") String address,@Param("startBlockTimestamp")  long startBlockTimestamp,@Param("endBlockTimestamp") long endBlockTimestamp);



    List<NodeDailyRewardVo> selectNodeDailyRewardAssignedList(@Param("queryDateTime") String queryDateTime);


    List<NodeDailyRewardVo> selectNodeMonthRewardAssignedList(@Param("queryDateTime") String queryDateTime);






}